package com.gzx.bi.core.utils;

import com.gzx.tjzy.feign.resp.repayment.RepaymentRespDto;

import java.util.List;

/**
 * @author zjt
 * @description
 * @date 2025/1/16 15:03
 */
public class ProjectCodeMappingUtil {

    public static void wxjk(List<RepaymentRespDto> repaymentRespDtoList) {
        for (RepaymentRespDto repaymentRespDto : repaymentRespDtoList) {
            if ("WXJK".equals(repaymentRespDto.getProjectCode())) {
                if (repaymentRespDto.getOverdueDay() != null && repaymentRespDto.getOverdueDay() <= 90) {
                    repaymentRespDto.setProjectCode(repaymentRespDto.getProjectCode() + "-M4");
                } else if (repaymentRespDto.getOverdueDay() != null && repaymentRespDto.getOverdueDay() <= 180) {
                    repaymentRespDto.setProjectCode(repaymentRespDto.getProjectCode() + "-M5-7");
                } else if (repaymentRespDto.getOverdueDay() != null && repaymentRespDto.getOverdueDay() <= 360) {
                    repaymentRespDto.setProjectCode(repaymentRespDto.getProjectCode() + "-M7-12");
                } else if (repaymentRespDto.getOverdueDay() != null && repaymentRespDto.getOverdueDay() <= 720) {
                    repaymentRespDto.setProjectCode(repaymentRespDto.getProjectCode() + "-M12以上");
                } else {
                    repaymentRespDto.setProjectCode(repaymentRespDto.getProjectCode() + "-M24以上");
                }
            }
        }
    }
}
